<?php 
/**
*回调地址,用来接收数据
*/
require_once('./function.php');
require_once('./Connect2.1/qqConnectAPI.php');

//echo $_GET['code'];

// 3EE0AACE205527429A31B5B1E107402E

//请求accesstoken的
$oauth=new Oauth();
$accesstoken=$oauth->qq_callback();
$openid=$oauth->get_openid();
// debug($openid);
// debug($accesstoken);

setcookie('qq_accesstoken',$accesstoken,time()+86400);
setcookie('qq_openid',$openid,time()+86400);
header("Location: index.php");
 ?>